﻿@{
    Layout = "~/Views/Shared/ManagerLayout.cshtml";
}

<!DOCTYPE html>

<html>
<head>
    <title></title>
</head>
<body>
    <div style=" padding: 0px 5px 0px 2px; height: 100%;">

        <div id="lay-search-panel" class="panel lay-panel" style=" margin-bottom: 5px;border:0px;">
        </div>
        <div id="lay-reslut" class=" lay-reslut ">
            <table id="dataGrid"></table>
        </div>
    </div>
</body>
</html>
<script>
    @{ViewBag.dropDownIds = "4";}
    var searchData = [[{"text":"商品","id":"CatalogCode","displayType":"drop","dataSource":optionConfig4,"columnType":"string","require":false,"disabled":false},{"text":"创建时间","id":"CreationTime","displayType":"date","dataSource":[],"columnType":"datetime","require":false,"disabled":false}]];
    var editData = [[{"text":"商品","id":"CatalogCode","displayType":"drop","dataSource":optionConfig4,"columnType":"string","require":true,"disabled":false},{"text":"排序号","id":"OrderNo","displayType":"text","dataSource":[],"columnType":"int","require":false,"disabled":false}],[{"text":"药品类别","id":"MedicineType","displayType":"text","dataSource":[],"columnType":"string","require":false,"disabled":false},{"text":"描述","id":"Remark","displayType":"text","dataSource":[],"columnType":"string","require":false,"disabled":false}],[{"text":"创建时间","id":"CreationTime","displayType":"date","dataSource":[],"columnType":"datetime","require":true,"disabled":false},{"text":"修改时间","id":"LastModificationTime","displayType":"datetime","dataSource":[],"columnType":"datetime","require":false,"disabled":false}]];


    var gridParameters= {
        loadMsg: '数据正在加载。。。。',
        //rownumbers: true,
        pageSize: 30,
        pageList: [10, 20, 30, 50, 80, 100, 200, 500, 1000],
        height: 340,
        key:'id',
        url: '/Wms_ProductCatalog/GetSingleData',
        nameSpace:'/System',
        queryParams: {TableName:'Wms_ProductCatalog',sort:'id',Foots:' ',Wheres:'{}'},
        pagination: true,
        striped:true,
        hasSection:false,
        cnName:'商品主数据',
        calculateHeight:{id:'#lay-search-panel'},
        calculateWidth:{id:'#lay-search-panel',totalWidth:790,totalCol:8},
    frozenColumns: [[
     { field: 'ck', checkbox: true }
    ]],
    //showFooter: true,
        columns: [[{field:'id',title:'id',datatype:'int',width:90,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'CatalogCode',title:'商品',datatype:'string',width:90,editor: { type: 'combobox', options: optionConfig4 },formatter: function (val, row, index) {
    return dataSource4.textFormatter(optionConfig4, val, row, index);
    },
require:true,align:'left',sortable:true},
                       {field:'ParentCatalogCode',title:'商品',datatype:'string',width:90,hidden:true,editor:'text',align:'left'},
                       {field:'CatalogName',title:'分类名称',datatype:'string',width:90,hidden:true,editor:'text',require:true,align:'left'},
                       {field:'MedicineType',title:'药品类别',datatype:'string',width:90,editor:'text',align:'left'},
                       {field:'OrderNo',title:'排序号',datatype:'int',width:90,editor:'text',align:'left'},
                       {field:'Remark',title:'描述',datatype:'string',width:160,editor:'text',align:'left'},
                       {field:'CreatorUserId',title:'创建人id',datatype:'int',width:90,hidden:true,require:true,align:'left'},
                       {field:'Creator',title:'创建人',datatype:'string',width:90,formatter:function (val, row, index) { return $.fn.layOut('createViewField',{row:row,val:val})},require:true,align:'left'},
                       {field:'CreationTime',title:'创建时间',datatype:'DateTime',width:90,editor:'datebox',require:true,align:'left',sortable:true},
                       {field:'LastModifierUserId',title:'修改人id',datatype:'int',width:90,hidden:true,align:'left'},
                       {field:'Modifier',title:'修改人',datatype:'string',width:90,align:'left'},
                       {field:'LastModificationTime',title:'修改时间',datatype:'DateTime',width:90,editor:'datetimebox',align:'left',sortable:true}]]
    };

    var $elementGrid;
    window.onload=function(){
        $elementGrid = $('#dataGrid').datagrid(gridParameters);
    }

    var $elementDetailGrid;
    var gridDetailParameters = '';
</script>

